Macintosh
Sample Code Notes
_____________________________________________________________________________
                                                  Developer Technical Support

#1:	Sample

Written by:	Darin Adler, Mark Bennett, and Jim Reekes

Versions:			1.00						August 1988
					1.01						November 1988
					1.02						April 1989

Components:			Sample.p					April 1, 1989
					Sample.c					April 1, 1989
					Sample.a					April 1, 1989
					Sample.inc1.a				April 1, 1989
					SampleMisc.a				April 1, 1989
					Sample.r					April 1, 1989
					Sample.h					April 1, 1989
					PSample.make				April 1, 1989
					CSample.make				April 1, 1989
					ASample.make				April 1, 1989
_____________________________________________________________________________

Major changes since 1.0
Revamped the way that memory availability is checked and handled 
at initialization.  Substantially changed the way windows are 
closed.  Added an error message dialog to better inform users, and 
improved error handling in general.  Finally, put a funny hack 
into the C version so we could call _PurgeSpace under MPW 2.0.2.

Search for Ò1.01Ó in the code to find all the specific changes.

Major changes since 1.01
Removed all dependencies on MPW 2.0; this version requires MPW 3.0 
or later.  Improved TrapAvailable to handle differences between 
machines prior to the Macintosh II and the Macintosh II and later 
models.

Search for Ò1.02Ó in the code to find all the specific changes.
_____________________________________________________________________________

Sample is an example application that demonstrates how to 
initialize the commonly used Toolbox managers, operate 
successfully under MultiFinder, handle desk accessories, and 
create, grow, and zoom windows.

It does not, by any means, demonstrate all the techniques you need 
for a large application.  In particular, Sample does not cover 
exception handling, multiple windows or documents, sophisticated 
memory management, printing, or undo, all of which are vital parts 
of a normal full-sized application.

This application is an example of the form of a Macintosh 
application; it is not a template.  It is not intended to be used 
as a foundation for the next world-class, best-selling, 600K 
application.  A stick figure drawing of the human body may be a 
good example of the form for a painting, but that does not mean it 
should be used as the basis for the next Mona Lisa.

We recommend that you review this program or TESample before 
beginning a new application.
